<%@ page language="java"  pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" charset="utf-8">
	$(function() {
		window.setTimeout(function(){
			$('#admin_thcx_searchForm input[name="salereturnno"]').focus();
	    }, 0);
		$('#admin_thcx_datagrid').datagrid({
			url : '${pageContext.request.contextPath}/saleReturnItemAction!datagrid.action',
			title : '',
			iconCls : 'icon-save',
			pagination : true,
			pageSize : 5,
			pageList : [ 5, 10, 15, 20 ],
			fit : true,
			fitColumns : true,
			nowrap : false,
			border : false,
			idField : 'id',
			rownumbers: true,
			columns : [ [ {
				field : 'id',
				title : '编号',
				width : 100,
				hidden :true
			},{
				field : 'salereturnno',
				title : '退货单号',
				width : 100,
			}, {
				field : 'name',
				title : '商品名称',
				width : 100
			}, {
				field : 'quantity',
				title : '退货数量',
				width : 100,
				sortable:true
			},{
				field : 'refundment',
				title : '退款金额',
				width : 100,
				sortable:true
			},{
				field : 'reason',
				title : '退货理由',
				width : 100,
			},
			{
				field : 'createdatetime',
				title : '退货时间',
				width : 100,
			},{
				field : 'remark',
				title : '其他备注',
				width : 100,
			}] ]
		});
	   searchFun=function() {
		   $('#admin_thcx_datagrid').datagrid('load',serializeObject($('#admin_thcx_searchForm')));
	  };
	   clearFun=function() {	
		$('#admin_thcx_datagrid').datagrid('load', {});
		$('#admin_thcx_searchForm input[name="salereturnno"]').val('');
  	    window.setTimeout(function(){
			$('#admin_thcx_searchForm input[name="salereturnno"]').focus();
	    }, 0);
	};
});
</script>
<div id="admin_qtth_layout" class="easyui-layout" data-options="border:false,fit:true">
<div region="north" data-options="border:false,title:'过滤信息'" style="height:65px;overflow:hidden;">
<form id="admin_thcx_searchForm">
<div style="float:left;margin:5px;"><input name="salereturnno" placeholder="输入退货单号可模糊查询" style="width:200px;"></input>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="searchFun();">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="clearFun();">清空</a>
</div>
</form>
</div>
<div region="center" data-options="border:false">
<table id="admin_thcx_datagrid"></table>
</div>
</div>